interface KHTMLElement {
    /**
     * 事件监听
     * @see HTMLElement.prototype.addEventListener
     * @param type 事件键
     * @param listener 事件回调函数
     * @param options 可选参数
     * @returns 当前元素对象
     */
    on(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): KHTMLElement;
}
{
    Object.defineProperty(KHTMLElement.prototype, 'on', {
        writable: false,
        configurable: false,
        enumerable: false,
        value: function (this: KHTMLElement, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) {
            this.elements.forEach(ele => { ele.addEventListener(type, listener, options); });
            return this;
        }
    });
}
